package com.example.tossednfound;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class AdminHomeActivity extends Activity {

	Button userListButton, itemListButton;
	/* (non-Javadoc)
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_admin_home);
		findViewById(R.id.adminHome_userList).setOnClickListener(
				new View.OnClickListener() {
					@Override
					public void onClick(View view) {
						Intent userListActivity =  new Intent("android.intent.action.USERLISTACTIVITY");
						startActivity(userListActivity);
					}
				});
		findViewById(R.id.adminHome_itemList).setOnClickListener(
				new View.OnClickListener() {
					@Override
					public void onClick(View view) {
						Intent itemListActivity =  new Intent("android.intent.action.ITEMLISTVIEWACTIVITY");
						startActivity(itemListActivity);
					}
				});
	}
	/* (non-Javadoc)
	 * @see android.app.Activity#onBackPressed()
	 */
	@Override
	public void onBackPressed() {
		Intent loginActivity =  new Intent("android.intent.action.LOGINACTIVITY");
		startActivity(loginActivity);
	}

}
